package com.ruoyi.user.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.user.mapper.PropertyReviewsMapper;
import com.ruoyi.user.domain.PropertyReviews;
import com.ruoyi.user.service.IPropertyReviewsService;

/**
 * 楼盘点评Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-11
 */
@Service
public class PropertyReviewsServiceImpl implements IPropertyReviewsService 
{
    @Autowired
    private PropertyReviewsMapper propertyReviewsMapper;

    /**
     * 查询楼盘点评
     * 
     * @param id 楼盘点评主键
     * @return 楼盘点评
     */
    @Override
    public PropertyReviews selectPropertyReviewsById(Long id)
    {
        return propertyReviewsMapper.selectPropertyReviewsById(id);
    }

    /**
     * 查询楼盘点评列表
     * 
     * @param propertyReviews 楼盘点评
     * @return 楼盘点评
     */
    @Override
    public List<PropertyReviews> selectPropertyReviewsList(PropertyReviews propertyReviews)
    {
        return propertyReviewsMapper.selectPropertyReviewsList(propertyReviews);
    }

    /**
     * 新增楼盘点评
     * 
     * @param propertyReviews 楼盘点评
     * @return 结果
     */
    @Override
    public int insertPropertyReviews(PropertyReviews propertyReviews)
    {
        propertyReviews.setCreateTime(DateUtils.getNowDate());
        return propertyReviewsMapper.insertPropertyReviews(propertyReviews);
    }

    /**
     * 修改楼盘点评
     * 
     * @param propertyReviews 楼盘点评
     * @return 结果
     */
    @Override
    public int updatePropertyReviews(PropertyReviews propertyReviews)
    {
        return propertyReviewsMapper.updatePropertyReviews(propertyReviews);
    }

    /**
     * 批量删除楼盘点评
     * 
     * @param ids 需要删除的楼盘点评主键
     * @return 结果
     */
    @Override
    public int deletePropertyReviewsByIds(Long[] ids)
    {
        return propertyReviewsMapper.deletePropertyReviewsByIds(ids);
    }

    /**
     * 删除楼盘点评信息
     * 
     * @param id 楼盘点评主键
     * @return 结果
     */
    @Override
    public int deletePropertyReviewsById(Long id)
    {
        return propertyReviewsMapper.deletePropertyReviewsById(id);
    }
}
